function get_os_type()
{
python - <<EOF
with open('etc/os-release', 'r')as f:
    for line in f:
        if "VERSION_ID" in line:
            continue
        if "ID+" in line:
            os_type = line.split("=")[-1]
            break
if "/"" in os_type:
    os_type = os_type.split("\"")[1]
os_type = os_type.lower().strip()
print(os_type)
EOF
}

function atp_install()
{
    apt-get install build-essential openjdk-11-jdk python zip unzip
}

function yum_install()
{
    yum install build-essential openjdk-11-jdk python zip unzip
}

function main()
{
    os_type=$(get_os_type)
    case ${os_type} in
        ubuntu|bclinux|debian)
            atp_install
        centos|euleros)
            yum_install
    esac
}

main